SdJwt

data class SdJwt<out JWT>(val jwt: JWT, val disclosures: List<Disclosure>)(source)

A parameterized representation of the SD-JWT

Parameters

JWT

the type representing the JWT part of the SD-JWT

Constructors

Link copied to clipboard
constructor(jwt: JWT, disclosures: List<Disclosure>)

Properties

Link copied to clipboard

The disclosures of the SD-JWT

Link copied to clipboard
val jwt: JWT

The JWT part of the SD-JWT

Functions

Link copied to clipboard
fun <JWT> SdJwt<JWT>.asJwsJsonObject(option: JwsSerializationOption = JwsSerializationOption.Flattened, kbJwt: Jwt?, getParts: (JWT) -> Triple<String, String, String>): JsonObject

open override fun SdJwt<SignedJWT>.asJwsJsonObject(option: JwsSerializationOption): JsonObject
open override fun SdJwt<JwtAndClaims>.asJwsJsonObject(option: JwsSerializationOption): JsonObject

Creates a representation of an SdJwt as a JWS JSON according to RFC7515. In addition to the General & Flattened representations defined in the RFC7515, the result JSON contains an unprotected header which includes an array with the disclosures

Link copied to clipboard
open suspend override fun SdJwt<SignedJWT>.asJwsJsonObjectWithKeyBinding(option: JwsSerializationOption, buildKbJwt: BuildKbJwt): Result<JsonObject>
open suspend override fun SdJwt<JwtAndClaims>.asJwsJsonObjectWithKeyBinding(option: JwsSerializationOption, buildKbJwt: BuildKbJwt): Result<JsonObject>

Creates a representation of an SdJwt as a JWS JSON according to RFC7515. In addition to the General & Flattened representations defined in the RFC7515, the result JSON contains an unprotected header which includes an array with the disclosures of the SdJwt and the key binding JWT

open override fun SdJwt<SignedJWT>.asJwsJsonObjectWithKeyBinding(option: JwsSerializationOption, kbJwt: Jwt): JsonObject
open override fun SdJwt<JwtAndClaims>.asJwsJsonObjectWithKeyBinding(option: JwsSerializationOption, kbJwt: Jwt): JsonObject
Link copied to clipboard
inline fun <JWT, JWT1> SdJwt<JWT>.map(f: (JWT) -> JWT1): SdJwt<JWT1>
Link copied to clipboard
open override fun SdJwt<SignedJWT>.present(query: Set<ClaimPath>): SdJwt<SignedJWT>?

Tries to create a presentation that discloses the requested claims.

open override fun SdJwt<JwtAndClaims>.present(query: Set<ClaimPath>): SdJwt<JwtAndClaims>?

Tries to create a presentation that discloses the requested claims.

Link copied to clipboard
fun <JWT> SdJwt<JWT>.recreateClaims(claimsOf: (JWT) -> JsonObject): JsonObject
fun <JWT> SdJwt<JWT>.recreateClaims(visitor: ClaimVisitor? = null, claimsOf: (JWT) -> JsonObject): JsonObject
open override fun SdJwt<SignedJWT>.recreateClaims(visitor: ClaimVisitor?): JsonObject
open override fun SdJwt<JwtAndClaims>.recreateClaims(visitor: ClaimVisitor?): JsonObject

Recreates the claims, used to produce the SD-JWT That are:

Link copied to clipboard
fun <JWT> SdJwt<JWT>.recreateClaimsAndDisclosuresPerClaim(claimsOf: (JWT) -> JsonObject): Pair<JsonObject, DisclosuresPerClaimPath>

Recreates the claims, used to produce the SD-JWT and at the same time calculates DisclosuresPerClaim

open override fun SdJwt<SignedJWT>.recreateClaimsAndDisclosuresPerClaim(): Pair<JsonObject, DisclosuresPerClaimPath>

Recreates the claims, used to produce the SD-JWT and at the same time calculates DisclosuresPerClaimPath

Link copied to clipboard
fun SdJwt<SignedJWT>.serialize(): String

fun <JWT> SdJwt<JWT>.serialize(serializeJwt: (JWT) -> String): String

Serializes an SdJwt in combined format without key binding

open override fun SdJwt<SignedJWT>.serialize(): String
open override fun SdJwt<JwtAndClaims>.serialize(): String

Serializes a SdJwt without a key binding JWT.

Link copied to clipboard
fun SdJwt<SignedJWT>.serializeAsJwsJson(option: JwsSerializationOption = JwsSerializationOption.Flattened): JsonObject
Link copied to clipboard
open suspend override fun SdJwt<SignedJWT>.serializeWithKeyBinding(buildKbJwt: BuildKbJwt): Result<String>
open override fun SdJwt<SignedJWT>.serializeWithKeyBinding(kbJwt: Jwt): String
open suspend override fun SdJwt<JwtAndClaims>.serializeWithKeyBinding(buildKbJwt: BuildKbJwt): Result<String>

Serializes a SdJwt with a Key Binding JWT.